<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title></title>
    <%@include file="/WEB-INF/pages/common/basic-styles.jspf" %>
</head>
<body>
	<div class="page-header">
		<h1>
			用户修改密码
		</h1>
	</div><!-- /.page-header -->
    <form:form method="post" commandName="user" class="form-horizontal" onsubmit="validForm">
    	<div class="form-group">
			<label class="col-sm-3 control-label no-padding-right" for="newPassword"> 新密码 </label>
			<div class="col-sm-9">
				<input type="password" id="newPassword" name="newPassword" placeholder="New Password" class="col-xs-10 col-sm-5" />
				<span class="help-inline col-xs-12 col-sm-7">
					<span class="middle" style="color: red">*</span>
				</span>
			</div>
		</div>
		<div class="space-4"></div>
		
        <div class="clearfix form-actions">
			<div class="col-md-offset-3 col-md-9">
				<form:button class="btn btn-info"><i class="icon-ok bigger-110"></i>修改密码</form:button>
				&nbsp; &nbsp; &nbsp;
				<button class="btn off" type="button"><i class="icon-off bigger-110"></i>关闭</button>
			</div>
		</div>
    </form:form>
	<%@include file="/WEB-INF/pages/common/basic-scripts.jspf" %>
	<script type="text/javascript">
		$(function() {
			$(".off").click(function() {
            	location.href = '${ctx}/manage/system/user';
            })
            
            function validForm() {
				var password = $("#newPassword").val();
	        	if (isEmpty(password)) {
	        		defaultAlert("密码不能为空");
	        		return false;
	        	}
	        	loading();
	        	return true;
			}
		});
	</script>
</body>
</html>